﻿<%@ Page Title="" Language="C#" MasterPageFile="~/LayoutCenter.Master" AutoEventWireup="true"  %>


<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">
<script type="text/javascript">
    Ext.chart.Chart.CHART_URL = 'TestCenter/Javascripts/charts.swf';
    Ext.onReady(function()
    {
        var store = new Ext.data.JsonStore({
            fields: ['result', 'total'],
            data: [{
                result: 'NotRun',
                total: 150
            }, {
                result: 'Passed',
                total: 245
            }, {
                result: 'Failed',
                total: 117
            }, {
                result: 'Blocked',
                total: 184
}]
            });

            new Ext.Panel({
                width: 400,
                height: 400,
                title: 'Pie Chart - Result In Current Build',
                renderTo: 'containerProcess',
                plain: true,
                items: {
                    store: store,
                    xtype: 'piechart',
                    dataField: 'total',
                    categoryField: 'result',
                    listeners: {
                        itemclick: function(o)
                        {
                            var rec = store.getAt(o.index);
                            alert('Item Selected');
                        }
                    }
                }
            });
        });
    </script>
<div id="containerProcess" style="vertical-align: top; padding: 6px;">
     
    </div>
</asp:Content>
